@extends('admin_system/public/layout')
@section('content')
<div class="col-xs-12 nav top-nav">
    <p class="float-left nav-path"><strong>当前位置：</strong>分会管理>>学习官</p>

    <a class="btn-default btn float-right back ml10">返回</a>
    <a class="btn-danger btn float-right" href="{{asset('admin_system/chapter/officerEdit?chapterId='.$_GET['chapterId'])}}">新增学习官</a>
</div>

<div class="content-box col-xs-12 mt20 pb20 pt20">


    <form class="form-inline nav mb10" method="get" action="{{asset('admin_system/chapter/drps')}}">
        <div class="form-group">
            <div class="input-group">
                <div class="input-group-addon">查询</div>
                <input type="hidden" name="chapterId" value="{{$chapterId}}">
                <input name="keywords" class="form-control"  placeholder="" value="{{$keywords}}">
                {{csrf_field()}}
            </div>
        </div>
        <button type="submit" class="btn btn-primary">搜索</button>
    </form>


    <table class="table table-bordered">
        <tr class="active">
            <th>#</th>
            <th>学习官姓名</th>
            <th>手机</th>
            <th>总计金额</th>
            <th>剩余金额</th>
            <th>加入时间</th>
            <th></th>
        </tr>


        @foreach($officers as $officer)

        <tr>
            <td>{{$loop->iteration + ($officers->currentPage() -1) * $officers->perPage()}}</td>
            <td>{{$officer->YourName}}</td>
            <td>{{$officer->UserName}}</td>
            <td>{{$officer->total_money}}</td>
            <td>{{$officer->surplus_money}}</td>
            <td>{{$officer->add_time}}</td>
            <td>
                <a href="{{asset('admin_system/chapter/officerDelete?officerId='.$officer->chapter_drp_id)}}">移出本分会</a>
                <a href="{{asset('admin_system/chapter/officerEdit?officerId='.$officer->chapter_drp_id)}}">编辑</a>
            </td>
        </tr>
        @endforeach
    </table>

    {!! $officers->appends(['keywords'=>$keywords,'chapterId'=>$chapterId])->links() !!}
</div>
@endsection
